﻿@model IEnumerable<AutomatedTestDataManagement.Models.TableMaster>

@{
    ViewBag.Title = "Index";
}

<h2>System Tables</h2>

<p>
    @Html.ActionLink("New Data Table", "Create")
</p>
<table>
    <tr>
        <th>
            @Html.Label("Table Name")
        </th>
        <th>
            @Html.Label("Table Kind")
        </th>
        <th>
            @Html.Label("Only DATA tables can be modified")
        </th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.TableName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TableKind)
        </td>
        <td>
            @if(item.TableKind == "DATA")
            {
                @Html.ActionLink("Edit", "Edit", new { id=item.TableMasterID }) @Html.Encode(" | ")
                @Html.ActionLink("Delete", "Delete", new { id=item.TableMasterID })
            }
            else
            {
            }
        </td>
    </tr>
}

</table>
